3 Copyright (C) 2022- Free Software Foundation, Inc.
5 Copying and distribution of this file, with or without modification,
6 are permitted in any medium without royalty provided the copyright
7 notice and this notice are preserved.
9 The following contributions warranted legal paper exchanges with the
10 Free Software Foundation.
13 shlib is a command & function set for shell program. the most important environment is shell command, and then is the different
15 shlib now is writen by bash shell. and have not tested in other shell program. some code implemented by bash grammar, for example
16 the '=~' operator is a regular expression matching feature, it is not supported by other shell.
17 different linux system, that means different command set and directory defination.
18 对于运行环境,有时候会想到vm虚拟机,但对于应用层的shell来说vm和一台计算机中运行shell是相同的。这里的运行环境,是指linux系统的版本,以及shell程序的类型。
19 不同的linux系统,对系统的目录的定义略有差异,对于系统包含的命令行程序集合,更是千差万别。ubuntu和fedora是两个常用的桌面相同,但它们之间的命令行差别也挺多的,甚至同样是ubuntu,不同的版本,不同的用户,程序命令集合也是不同的。再者,像是windows下的cygwin,windows下的linux subsystem,或者是安卓下安装的busybox的app,都是不同的运行环境。
20 对于不同的shell程序,会有不同的功能。有些程序所使用的语法格式也有所不同,像zsh的if语句和bash的if语句就是不一样的。也有些存在一些细微的差别,例如sh中函数名称不能使用-、:这类字符,而bash中可以使用。
21 所以对于shlib-lite,在使用前需要使用scripttest运行测试程序,以使得安装的shlib-lite可以在当前运行环境较好的使用。在shlib-lite可使用的运行环境,通常其它shlib可不进行scripttest,除非需要一些额外的程序等资源。
23 通常shlib使用在pc的ubuntu系统下,以及termux终端app软件中。